<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        .main{
            width: 500px;
            height: 300px;
            background-color: red;
            position: relative;
        }

        .main div{
            width: 200px;
            height: 100px;
            background-color: blue;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
        }
    </style>
</head>
<body>
<div class="main">
    <div>
    </div>
</div>
</body>
</html>
